// 通用操作
export const MESSAGES = {
    SUCCESS: '操作成功',
    FAILED: '操作失败',
    UPDATE_FAILED: '更新失败',
    DELETE_FAILED: '删除失败',
    LOADING: '加载中...',
    CONFIRM_DELETE: '确定要删除吗？此操作不可恢复',
} as const

// 用户相关
export const USER = {
    LOGIN_SUCCESS: '登录成功',
    LOGIN_FAILED: '登录失败，请检查账号密码',
    LOGOUT_SUCCESS: '已安全退出',
    REGISTER_SUCCESS: '注册成功',
    REGISTER_FAILED: '注册失败，请稍后重试',
    INVALID_EMAIL: '请输入正确的邮箱格式',
    PASSWORD_MISMATCH: '两次输入的密码不一致',
    PROFILE_UPDATE_SUCCESS: '个人信息更新成功',
    PROFILE_UPDATE_FAILED: '修改失败',
    PASSWORD_RESET_SUCCESS: '密码修改成功，请重新登录',
    PASSWORD_RESET_COMPLETE: '密码重置成功！请使用新密码登录',
    PASSWORD_RESET_FAILED: '密码重置失败，请检查信息后重试',
    CAPTCHA_SENT: '验证码已发送到您的邮箱',
    CAPTCHA_SEND_FAILED: '发送验证码失败',
    LOAD_FAILED: '加载用户列表失败',
} as const

// 文件操作
export const UPLOAD = {
    SUCCESS: '上传成功',
    FAILED: '上传失败',
    FILE_REQUIRED: '请选择要上传的文件',
    FILE_TOO_LARGE: '文件大小超出限制',
    INVALID_FILE_TYPE: '不支持的文件格式',
} as const

// 图片操作
export const PICTURE = {
    DELETE_SUCCESS: '图片删除成功',
    DELETE_FAILED: '删除失败',
    UPDATE_SUCCESS: '图片信息更新成功',
    UPDATE_FAILED: '更新失败',
    LOAD_FAILED: '图片加载失败',
    SHARE_SUCCESS: '图片链接已复制到剪贴板',
    SHARE_FAILED: '分享失败',
    DOWNLOAD_START: '开始下载图片',
    APPROVED: '图片审核通过',
    REJECTED: '图片审核不通过',
} as const

// 空间相关
export const SPACE = {
    CREATE_SUCCESS: '空间创建成功',
    CREATE_FAILED: '空间创建失败',
    UPDATE_SUCCESS: '空间信息更新成功',
    UPDATE_FAILED: '更新失败',
    DELETE_SUCCESS: '空间删除成功',
    DELETE_FAILED: '删除失败',
    DELETED: '空间已删除',
    JOIN_SUCCESS: '成功加入空间',
    JOIN_FAILED: '加入空间失败',
    LEAVE_SUCCESS: '已退出空间',
    LEAVE_FAILED: '退出失败',
    INVITE_GENERATED: '邀请码生成成功',
    INVITE_FAILED: '生成邀请码失败',
    INVITE_COPIED: '邀请码已复制到剪贴板',
    MEMBER_REMOVED: '成员已移除',
    MEMBER_REMOVE_FAILED: '移除失败',
    ROLE_UPDATED: '角色已更新',
    ROLE_UPDATE_FAILED: '更新失败',
    LOAD_FAILED: '加载空间失败',
    MEMBER_LOAD_FAILED: '加载成员列表失败',
    LIST_LOAD_FAILED: '加载空间列表失败',
    COPY_FAILED: '复制失败',
} as const

// 表单验证
export const VALIDATION = {
    REQUIRED: '此字段为必填项',
    INVALID_FORMAT: '格式不正确',
    MIN_LENGTH: (min: number) => `至少输入${min}个字符`,
    MAX_LENGTH: (max: number) => `最多输入${max}个字符`,
    RANGE_LENGTH: (min: number, max: number) => `请输入${min}-${max}个字符`,
} as const
